Excel VBA Conditional Formatting; Hide worksheet based on day of week

您所在的位置:网站首页 vba worksheet Excel VBA Conditional Formatting; Hide worksheet based on day of week

Excel VBA Conditional Formatting; Hide worksheet based on day of week

#Excel VBA Conditional Formatting; Hide worksheet based on day of week| 来源: 网络整理| 查看: 265

VBA newbie here. I'm attempting to have 2 worksheets responding to formulas that I believe should be used with VBA. 

 

Context: I have a workbook that contains a fill-in checklist that has names, addresses, dates, etc. One of these cell values is the date of death, and another cell has values for the day of the week they died. 

 

Currently, the "Day of week" cell has a formula pulling the date, and outputting the day of week in text

 

Ex: F3 = 11/05/1998 -> F4 = Thursday. F4 formula is [=TEXT(F3,"dddd")].

 

I have 2 worksheets within the workbook that alternate usage based on what day of the week it is. 

Worksheet "DOD Stocks" and "Weekend DOD Stocks"

 

I'd like to use VBA to make "DOD Stocks" hidden when the day of death is a Sunday or Saturday.

Alternatively, I'd also like to have "Weekend DOD Stocks" hidden when the day of death is a weekday.

 

Would appreciate your responses!



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3